3.1047 \(\int \frac {x^{-1+3 n} (a+b x^n)}{c+d x^n} \, dx\)

Optimal. Leaf size=86 \[ -\frac {c^2 (b c-a d) \log \left (c+d x^n\right )}{d^4 n}+\frac {c x^n (b c-a d)}{d^3 n}-\frac {x^{2 n} (b c-a d)}{2 d^2 n}+\frac {b x^{3 n}}{3 d n} \]

[Out]

c*(-a*d+b*c)*x^n/d^3/n-1/2*(-a*d+b*c)*x^(2*n)/d^2/n+1/3*b*x^(3*n)/d/n-c^2*(-a*d+b*c)*ln(c+d*x^n)/d^4/n

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 86, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {446, 77} \[ -\frac {c^2 (b c-a d) \log \left (c+d x^n\right )}{d^4 n}+\frac {c x^n (b c-a d)}{d^3 n}-\frac {x^{2 n} (b c-a d)}{2 d^2 n}+\frac {b x^{3 n}}{3 d n} \]

Antiderivative was successfully verified.

[In]

Int[(x^(-1 + 3*n)*(a + b*x^n))/(c + d*x^n),x]

[Out]

(c*(b*c - a*d)*x^n)/(d^3*n) - ((b*c - a*d)*x^(2*n))/(2*d^2*n) + (b*x^(3*n))/(3*d*n) - (c^2*(b*c - a*d)*Log[c +
 d*x^n])/(d^4*n)

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 446

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rubi steps

\begin {align*} \int \frac {x^{-1+3 n} \left (a+b x^n\right )}{c+d x^n} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^2 (a+b x)}{c+d x} \, dx,x,x^n\right )}{n}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {c (b c-a d)}{d^3}+\frac {(-b c+a d) x}{d^2}+\frac {b x^2}{d}-\frac {c^2 (b c-a d)}{d^3 (c+d x)}\right ) \, dx,x,x^n\right )}{n}\\ &=\frac {c (b c-a d) x^n}{d^3 n}-\frac {(b c-a d) x^{2 n}}{2 d^2 n}+\frac {b x^{3 n}}{3 d n}-\frac {c^2 (b c-a d) \log \left (c+d x^n\right )}{d^4 n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 78, normalized size = 0.91 \[ \frac {-\frac {c^2 (b c-a d) \log \left (c+d x^n\right )}{d^4}+\frac {c x^n (b c-a d)}{d^3}-\frac {x^{2 n} (b c-a d)}{2 d^2}+\frac {b x^{3 n}}{3 d}}{n} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^(-1 + 3*n)*(a + b*x^n))/(c + d*x^n),x]

[Out]

((c*(b*c - a*d)*x^n)/d^3 - ((b*c - a*d)*x^(2*n))/(2*d^2) + (b*x^(3*n))/(3*d) - (c^2*(b*c - a*d)*Log[c + d*x^n]
)/d^4)/n

________________________________________________________________________________________

fricas [A]  time = 0.74, size = 82, normalized size = 0.95 \[ \frac {2 \, b d^{3} x^{3 \, n} - 3 \, {\left (b c d^{2} - a d^{3}\right )} x^{2 \, n} + 6 \, {\left (b c^{2} d - a c d^{2}\right )} x^{n} - 6 \, {\left (b c^{3} - a c^{2} d\right )} \log \left (d x^{n} + c\right )}{6 \, d^{4} n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+3*n)*(a+b*x^n)/(c+d*x^n),x, algorithm="fricas")

[Out]

1/6*(2*b*d^3*x^(3*n) - 3*(b*c*d^2 - a*d^3)*x^(2*n) + 6*(b*c^2*d - a*c*d^2)*x^n - 6*(b*c^3 - a*c^2*d)*log(d*x^n
 + c))/(d^4*n)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (b x^{n} + a\right )} x^{3 \, n - 1}}{d x^{n} + c}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+3*n)*(a+b*x^n)/(c+d*x^n),x, algorithm="giac")

[Out]

integrate((b*x^n + a)*x^(3*n - 1)/(d*x^n + c), x)

________________________________________________________________________________________

maple [A]  time = 0.07, size = 125, normalized size = 1.45 \[ \frac {a \,c^{2} \ln \left (d \,{\mathrm e}^{n \ln \relax (x )}+c \right )}{d^{3} n}-\frac {a c \,{\mathrm e}^{n \ln \relax (x )}}{d^{2} n}+\frac {a \,{\mathrm e}^{2 n \ln \relax (x )}}{2 d n}-\frac {b \,c^{3} \ln \left (d \,{\mathrm e}^{n \ln \relax (x )}+c \right )}{d^{4} n}+\frac {b \,c^{2} {\mathrm e}^{n \ln \relax (x )}}{d^{3} n}-\frac {b c \,{\mathrm e}^{2 n \ln \relax (x )}}{2 d^{2} n}+\frac {b \,{\mathrm e}^{3 n \ln \relax (x )}}{3 d n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(3*n-1)*(b*x^n+a)/(d*x^n+c),x)

[Out]

1/3*b/d/n*exp(n*ln(x))^3+1/2/d/n*exp(n*ln(x))^2*a-1/2/d^2/n*exp(n*ln(x))^2*b*c-c/d^2/n*exp(n*ln(x))*a+c^2/d^3/
n*exp(n*ln(x))*b+c^2/d^3/n*ln(d*exp(n*ln(x))+c)*a-c^3/d^4/n*ln(d*exp(n*ln(x))+c)*b

________________________________________________________________________________________

maxima [A]  time = 0.53, size = 112, normalized size = 1.30 \[ -\frac {1}{6} \, b {\left (\frac {6 \, c^{3} \log \left (\frac {d x^{n} + c}{d}\right )}{d^{4} n} - \frac {2 \, d^{2} x^{3 \, n} - 3 \, c d x^{2 \, n} + 6 \, c^{2} x^{n}}{d^{3} n}\right )} + \frac {1}{2} \, a {\left (\frac {2 \, c^{2} \log \left (\frac {d x^{n} + c}{d}\right )}{d^{3} n} + \frac {d x^{2 \, n} - 2 \, c x^{n}}{d^{2} n}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+3*n)*(a+b*x^n)/(c+d*x^n),x, algorithm="maxima")

[Out]

-1/6*b*(6*c^3*log((d*x^n + c)/d)/(d^4*n) - (2*d^2*x^(3*n) - 3*c*d*x^(2*n) + 6*c^2*x^n)/(d^3*n)) + 1/2*a*(2*c^2
*log((d*x^n + c)/d)/(d^3*n) + (d*x^(2*n) - 2*c*x^n)/(d^2*n))

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {x^{3\,n-1}\,\left (a+b\,x^n\right )}{c+d\,x^n} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^(3*n - 1)*(a + b*x^n))/(c + d*x^n),x)

[Out]

int((x^(3*n - 1)*(a + b*x^n))/(c + d*x^n), x)

________________________________________________________________________________________

sympy [A]  time = 57.94, size = 139, normalized size = 1.62 \[ \begin {cases} \frac {\left (a + b\right ) \log {\relax (x )}}{c} & \text {for}\: d = 0 \wedge n = 0 \\\frac {\frac {a x^{3 n}}{3 n} + \frac {b x^{4 n}}{4 n}}{c} & \text {for}\: d = 0 \\\frac {\left (a + b\right ) \log {\relax (x )}}{c + d} & \text {for}\: n = 0 \\\frac {a c^{2} \log {\left (\frac {c}{d} + x^{n} \right )}}{d^{3} n} - \frac {a c x^{n}}{d^{2} n} + \frac {a x^{2 n}}{2 d n} - \frac {b c^{3} \log {\left (\frac {c}{d} + x^{n} \right )}}{d^{4} n} + \frac {b c^{2} x^{n}}{d^{3} n} - \frac {b c x^{2 n}}{2 d^{2} n} + \frac {b x^{3 n}}{3 d n} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1+3*n)*(a+b*x**n)/(c+d*x**n),x)

[Out]

Piecewise(((a + b)*log(x)/c, Eq(d, 0) & Eq(n, 0)), ((a*x**(3*n)/(3*n) + b*x**(4*n)/(4*n))/c, Eq(d, 0)), ((a +
b)*log(x)/(c + d), Eq(n, 0)), (a*c**2*log(c/d + x**n)/(d**3*n) - a*c*x**n/(d**2*n) + a*x**(2*n)/(2*d*n) - b*c*
*3*log(c/d + x**n)/(d**4*n) + b*c**2*x**n/(d**3*n) - b*c*x**(2*n)/(2*d**2*n) + b*x**(3*n)/(3*d*n), True))

________________________________________________________________________________________